package mcweb.model.dao;

import java.sql.SQLException;

import mcweb.dto.ProductDTO;

import org.springframework.orm.ibatis.SqlMapClientTemplate;

public class CartDAOImpl implements ICartDAO{
	
	private SqlMapClientTemplate sqlMapClientTemplate;
	
	public CartDAOImpl() {}
	public CartDAOImpl(SqlMapClientTemplate sqlMapClientTemplate) {
		this.sqlMapClientTemplate = sqlMapClientTemplate;
	}

	
	@Override
	public ProductDTO selectCartById(String id) throws SQLException{
		return (ProductDTO) sqlMapClientTemplate.queryForObject("cart.selectCartById",id);
	}
}
